<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>uCXpresso.BLE: gc.h Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../upnp.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">uCXpresso.BLE
   &#160;<span id="projectnumber">v1.0.4</span>
   </div>
   <div id="projectbrief">RTOS C++ Framework for Bluetooth Low Energy</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../modules.html"><span>Modules</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d0/daa/gc_8h_source.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Groups</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">gc.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> ===============================================================================</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> Name        : gc.h</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> Author      : uCXpresso</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> Version     : v1.0.2</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> Date        : 2014/3/26</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> Copyright   : Copyright (C) www.embeda.com.tw</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> License     : MIT</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> Description : Simple Garbage Collector Template Class</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> ===============================================================================</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">                                 History</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> ---------+---------+--------------------------------------------+-------------</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> DATE     | VERSION |   DESCRIPTIONS                             |  By</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> ---------+---------+--------------------------------------------+-------------</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> 2014/3/24  v1.0.0  First Edition                                   Jason</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> 2014/3/25  v1.0.1  Add Mutex Lock for Multi-Tasking.               Jason</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> 2014/3/26  v1.0.2  Add [] operator for Array.                      Jason</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> ===============================================================================</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#ifdef GC_TEMPLATE</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#ifndef gcHandle_H_</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define gcHandle_H_</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &lt;class/object.h&gt;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &lt;class/mutex.h&gt;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#define NOTHING                 ((xHandle) NULL)</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define GC_FOR_MULTITASKING     1</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="../../df/dee/class__gc__.html">   34</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../df/dee/class__gc__.html">_gc_</a> : <span class="keyword">public</span> <a class="code" href="../../dc/dac/class_c_object.html">CObject</a> {</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../df/dee/class__gc__.html#ab889108bb8c0dfe3eabb6e9509f38c12">reference</a>() = PURE_VIRTUAL_FUNC;   <span class="comment">// increase reference count</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../df/dee/class__gc__.html#ac58b2d3e3a3762528fffe36dcfa4f0c2">release</a>() = PURE_VIRTUAL_FUNC;     <span class="comment">// decrease reference count</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#if GC_FOR_MULTITASKING</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="../../df/dee/class__gc__.html#a958083a4d6cb648dd5cfd3292ec109de">   42</a></span>&#160;    <span class="keyword">virtual</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="../../df/dee/class__gc__.html#a958083a4d6cb648dd5cfd3292ec109de">lock</a>()      { <span class="keywordflow">if</span> ( <a class="code" href="../../df/dee/class__gc__.html#a99eeb7570f75b51df025d2a4c8b0c12a">m_gc</a> ) <a class="code" href="../../df/dee/class__gc__.html#a99eeb7570f75b51df025d2a4c8b0c12a">m_gc</a>-&gt;<a class="code" href="../../d2/dc8/struct__gc___1_1_g_c___t.html#a1e5b7a3167518698084636a0c0251be4">mutex</a>.<a class="code" href="../../d3/d0d/class_c_mutex.html#a820d77775dfd7d5dddfdac6bbf89b67a">lock</a>(); }</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="../../df/dee/class__gc__.html#a787f0334817f64acc6f41eb0839c3f58">   46</a></span>&#160;    <span class="keyword">virtual</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="../../df/dee/class__gc__.html#a787f0334817f64acc6f41eb0839c3f58">unlock</a>()    { <span class="keywordflow">if</span> ( <a class="code" href="../../df/dee/class__gc__.html#a99eeb7570f75b51df025d2a4c8b0c12a">m_gc</a> ) <a class="code" href="../../df/dee/class__gc__.html#a99eeb7570f75b51df025d2a4c8b0c12a">m_gc</a>-&gt;<a class="code" href="../../d2/dc8/struct__gc___1_1_g_c___t.html#a1e5b7a3167518698084636a0c0251be4">mutex</a>.<a class="code" href="../../d3/d0d/class_c_mutex.html#aee0e6661ae4b790104a9a4205910d53d">unlock</a>(); }</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="../../d2/dc8/struct__gc___1_1_g_c___t.html">   50</a></span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="preprocessor">        #if GC_FOR_MULTITASKING</span></div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="../../d2/dc8/struct__gc___1_1_g_c___t.html#a1e5b7a3167518698084636a0c0251be4">   52</a></span>&#160;<span class="preprocessor"></span>            <a class="code" href="../../d3/d0d/class_c_mutex.html">CMutex</a>  <a class="code" href="../../d2/dc8/struct__gc___1_1_g_c___t.html#a1e5b7a3167518698084636a0c0251be4">mutex</a>;      <span class="comment">// mutex lock for multi-tasking</span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="preprocessor">        #endif</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="../../d2/dc8/struct__gc___1_1_g_c___t.html#a0ca0af7bbf3c73b50fec32e8d77e64dd">   54</a></span>&#160;<span class="preprocessor"></span>        <span class="keywordtype">int</span>         <a class="code" href="../../d2/dc8/struct__gc___1_1_g_c___t.html#a0ca0af7bbf3c73b50fec32e8d77e64dd">refcount</a>;   <span class="comment">// reference count</span></div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="../../d2/dc8/struct__gc___1_1_g_c___t.html#a1f1a425f4187c332658a36438600d11d">   55</a></span>&#160;        xHandle     <a class="code" href="../../d2/dc8/struct__gc___1_1_g_c___t.html#a1f1a425f4187c332658a36438600d11d">elem</a>;       <span class="comment">// user&#39;s data point</span></div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    }<a class="code" href="../../d2/dc8/struct__gc___1_1_g_c___t.html">GC_T</a>;</div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="../../df/dee/class__gc__.html#a99eeb7570f75b51df025d2a4c8b0c12a">   57</a></span>&#160;    <a class="code" href="../../d2/dc8/struct__gc___1_1_g_c___t.html">GC_T</a>    *<a class="code" href="../../df/dee/class__gc__.html#a99eeb7570f75b51df025d2a4c8b0c12a">m_gc</a>;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;};</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">class</span> CType&gt;</div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="../../d4/ddd/classgc_handle_t.html">   65</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../d4/ddd/classgc_handle_t.html">gcHandleT</a>: <span class="keyword">public</span> <a class="code" href="../../df/dee/class__gc__.html">_gc_</a> {</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <span class="comment">// Constructors</span></div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <a class="code" href="../../d4/ddd/classgc_handle_t.html#aa8e99b3f41bdbdd88425e25dc36f42a6">gcHandleT</a>(CType *elem=NULL);</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <a class="code" href="../../d4/ddd/classgc_handle_t.html#aa8e99b3f41bdbdd88425e25dc36f42a6">gcHandleT</a>(<span class="keyword">const</span> <a class="code" href="../../d4/ddd/classgc_handle_t.html">gcHandleT&lt;CType&gt;</a> &amp;gc);</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="comment">// Assigned Operators</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="../../d4/ddd/classgc_handle_t.html">gcHandleT&lt;CType&gt;</a>&amp; <a class="code" href="../../d4/ddd/classgc_handle_t.html#afa65ed5c2bf8f467839f30979e507f2d">operator = </a>(<a class="code" href="../../d4/ddd/classgc_handle_t.html">gcHandleT&lt;CType&gt;</a> &amp;gc);</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="../../d4/ddd/classgc_handle_t.html">gcHandleT&lt;CType&gt;</a>&amp; <a class="code" href="../../d4/ddd/classgc_handle_t.html#afa65ed5c2bf8f467839f30979e507f2d">operator = </a>(CType* elem);</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../d4/ddd/classgc_handle_t.html#afa65ed5c2bf8f467839f30979e507f2d">operator = </a>(xHandle gc);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <span class="comment">// Retrieved Operators</span></div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <span class="keyword">virtual</span> CType* <a class="code" href="../../d4/ddd/classgc_handle_t.html#ad7f7dff891cf46e8fb191a13f8a080be">operator -&gt; </a>();</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    <span class="keyword">virtual</span> <span class="keyword">operator</span> CType* ();</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="keyword">virtual</span> CType&amp; <a class="code" href="../../d4/ddd/classgc_handle_t.html#a2c6e285f9f27ef7bad32c68f0d8fd453">operator * </a>();</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <span class="keyword">virtual</span> CType&amp; <a class="code" href="../../d4/ddd/classgc_handle_t.html#aa0fc335ecb4fac2a292f3b7e7ffd33c7">operator [] </a>(<span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <span class="keyword">virtual</span> xHandle <a class="code" href="../../d4/ddd/classgc_handle_t.html#ab798d5e461aaea13ad76b25753342346">operator &amp; </a>();</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    <span class="keyword">virtual</span> <span class="keyword">operator</span> xHandle();</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <span class="comment">// Boolean Operators</span></div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="../../d4/ddd/classgc_handle_t.html#aae22cc95ca1d2fd48bc9a70b17c4e56d">operator == </a>(<a class="code" href="../../d4/ddd/classgc_handle_t.html">gcHandleT&lt;CType&gt;</a> &amp;gc);</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="../../d4/ddd/classgc_handle_t.html#aabf6aa22cd176b662a6aec0a7f7fa447">operator != </a>(<a class="code" href="../../d4/ddd/classgc_handle_t.html">gcHandleT&lt;CType&gt;</a> &amp;gc);</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="../../d4/ddd/classgc_handle_t.html#aae22cc95ca1d2fd48bc9a70b17c4e56d">operator == </a>(CType *elem);</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="../../d4/ddd/classgc_handle_t.html#aabf6aa22cd176b662a6aec0a7f7fa447">operator != </a>(CType *elem);</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    <span class="comment">// Miscellaneous</span></div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../d4/ddd/classgc_handle_t.html#ab382fa1f1681482b3b5acf62df1face2">reference</a>();</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../d4/ddd/classgc_handle_t.html#ad8a166285a27dad69e0153bca7b6b88d">release</a>();</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="../../d4/ddd/classgc_handle_t.html#a0b8a2e0f42aec92f550bc40f29576bc0">count</a>();</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../d4/ddd/classgc_handle_t.html#a6a7c68205da35740e35505fca540fc5b">weakTo</a>(<a class="code" href="../../d4/ddd/classgc_handle_t.html">gcHandleT&lt;CType&gt;</a> &amp;gc);</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    <span class="keyword">virtual</span> xHandle <a class="code" href="../../d4/ddd/classgc_handle_t.html#adea057fa184e0afd46abc0b6e9d4b762">clone</a>();</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;</div>
<div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="../../d4/ddd/classgc_handle_t.html#ab35bfc017cd77053934dd6badb162acd">  174</a></span>&#160;    <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="../../d4/ddd/classgc_handle_t.html#ab35bfc017cd77053934dd6badb162acd">isValid</a>() {</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        <span class="keywordflow">return</span> (<a class="code" href="../../d4/ddd/classgc_handle_t.html#a0b8a2e0f42aec92f550bc40f29576bc0">count</a>() ? <span class="keyword">true</span> : <span class="keyword">false</span>);</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    }</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;</div>
<div class="line"><a name="l00180"></a><span class="lineno"><a class="line" href="../../d4/ddd/classgc_handle_t.html#a2e314e4db601a2de651f69833dd78dc6">  180</a></span>&#160;    <span class="keyword">inline</span> <span class="keyword">operator</span> bool () {</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d4/ddd/classgc_handle_t.html#ab35bfc017cd77053934dd6badb162acd">isValid</a>();</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    }</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;    <span class="comment">// Internal used</span></div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="../../d4/ddd/classgc_handle_t.html">gcHandleT</a>();</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;};</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* gcHandle_H_ */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#include &quot;template/gc.cpp&quot;</span></div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;<span class="preprocessor">#endif // ELSE GC_TEMPLATE</span></div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;<span class="preprocessor"></span></div>
<div class="ttc" id="struct__gc___1_1_g_c___t_html_a0ca0af7bbf3c73b50fec32e8d77e64dd"><div class="ttname"><a href="../../d2/dc8/struct__gc___1_1_g_c___t.html#a0ca0af7bbf3c73b50fec32e8d77e64dd">_gc_::GC_T::refcount</a></div><div class="ttdeci">int refcount</div><div class="ttdef"><b>Definition:</b> gc.h:54</div></div>
<div class="ttc" id="classgc_handle_t_html_a2c6e285f9f27ef7bad32c68f0d8fd453"><div class="ttname"><a href="../../d4/ddd/classgc_handle_t.html#a2c6e285f9f27ef7bad32c68f0d8fd453">gcHandleT::operator*</a></div><div class="ttdeci">virtual CType &amp; operator*()</div></div>
<div class="ttc" id="class__gc___html_a958083a4d6cb648dd5cfd3292ec109de"><div class="ttname"><a href="../../df/dee/class__gc__.html#a958083a4d6cb648dd5cfd3292ec109de">_gc_::lock</a></div><div class="ttdeci">virtual void lock()</div><div class="ttdef"><b>Definition:</b> gc.h:42</div></div>
<div class="ttc" id="classgc_handle_t_html_ab382fa1f1681482b3b5acf62df1face2"><div class="ttname"><a href="../../d4/ddd/classgc_handle_t.html#ab382fa1f1681482b3b5acf62df1face2">gcHandleT::reference</a></div><div class="ttdeci">virtual void reference()</div></div>
<div class="ttc" id="classgc_handle_t_html_ad7f7dff891cf46e8fb191a13f8a080be"><div class="ttname"><a href="../../d4/ddd/classgc_handle_t.html#ad7f7dff891cf46e8fb191a13f8a080be">gcHandleT::operator-&gt;</a></div><div class="ttdeci">virtual CType * operator-&gt;()</div></div>
<div class="ttc" id="class__gc___html_a787f0334817f64acc6f41eb0839c3f58"><div class="ttname"><a href="../../df/dee/class__gc__.html#a787f0334817f64acc6f41eb0839c3f58">_gc_::unlock</a></div><div class="ttdeci">virtual void unlock()</div><div class="ttdef"><b>Definition:</b> gc.h:46</div></div>
<div class="ttc" id="struct__gc___1_1_g_c___t_html_a1e5b7a3167518698084636a0c0251be4"><div class="ttname"><a href="../../d2/dc8/struct__gc___1_1_g_c___t.html#a1e5b7a3167518698084636a0c0251be4">_gc_::GC_T::mutex</a></div><div class="ttdeci">CMutex mutex</div><div class="ttdef"><b>Definition:</b> gc.h:52</div></div>
<div class="ttc" id="classgc_handle_t_html_aa8e99b3f41bdbdd88425e25dc36f42a6"><div class="ttname"><a href="../../d4/ddd/classgc_handle_t.html#aa8e99b3f41bdbdd88425e25dc36f42a6">gcHandleT::gcHandleT</a></div><div class="ttdeci">gcHandleT(CType *elem=NULL)</div></div>
<div class="ttc" id="classgc_handle_t_html"><div class="ttname"><a href="../../d4/ddd/classgc_handle_t.html">gcHandleT</a></div><div class="ttdef"><b>Definition:</b> gc.h:65</div></div>
<div class="ttc" id="struct__gc___1_1_g_c___t_html"><div class="ttname"><a href="../../d2/dc8/struct__gc___1_1_g_c___t.html">_gc_::GC_T</a></div><div class="ttdef"><b>Definition:</b> gc.h:50</div></div>
<div class="ttc" id="classgc_handle_t_html_a6a7c68205da35740e35505fca540fc5b"><div class="ttname"><a href="../../d4/ddd/classgc_handle_t.html#a6a7c68205da35740e35505fca540fc5b">gcHandleT::weakTo</a></div><div class="ttdeci">virtual void weakTo(gcHandleT&lt; CType &gt; &amp;gc)</div></div>
<div class="ttc" id="classgc_handle_t_html_ad8a166285a27dad69e0153bca7b6b88d"><div class="ttname"><a href="../../d4/ddd/classgc_handle_t.html#ad8a166285a27dad69e0153bca7b6b88d">gcHandleT::release</a></div><div class="ttdeci">virtual void release()</div></div>
<div class="ttc" id="class_c_mutex_html_aee0e6661ae4b790104a9a4205910d53d"><div class="ttname"><a href="../../d3/d0d/class_c_mutex.html#aee0e6661ae4b790104a9a4205910d53d">CMutex::unlock</a></div><div class="ttdeci">virtual void unlock()</div></div>
<div class="ttc" id="struct__gc___1_1_g_c___t_html_a1f1a425f4187c332658a36438600d11d"><div class="ttname"><a href="../../d2/dc8/struct__gc___1_1_g_c___t.html#a1f1a425f4187c332658a36438600d11d">_gc_::GC_T::elem</a></div><div class="ttdeci">xHandle elem</div><div class="ttdef"><b>Definition:</b> gc.h:55</div></div>
<div class="ttc" id="classgc_handle_t_html_aae22cc95ca1d2fd48bc9a70b17c4e56d"><div class="ttname"><a href="../../d4/ddd/classgc_handle_t.html#aae22cc95ca1d2fd48bc9a70b17c4e56d">gcHandleT::operator==</a></div><div class="ttdeci">bool operator==(gcHandleT&lt; CType &gt; &amp;gc)</div></div>
<div class="ttc" id="class__gc___html_ab889108bb8c0dfe3eabb6e9509f38c12"><div class="ttname"><a href="../../df/dee/class__gc__.html#ab889108bb8c0dfe3eabb6e9509f38c12">_gc_::reference</a></div><div class="ttdeci">virtual void reference()</div></div>
<div class="ttc" id="class__gc___html_ac58b2d3e3a3762528fffe36dcfa4f0c2"><div class="ttname"><a href="../../df/dee/class__gc__.html#ac58b2d3e3a3762528fffe36dcfa4f0c2">_gc_::release</a></div><div class="ttdeci">virtual void release()</div></div>
<div class="ttc" id="class__gc___html"><div class="ttname"><a href="../../df/dee/class__gc__.html">_gc_</a></div><div class="ttdef"><b>Definition:</b> gc.h:34</div></div>
<div class="ttc" id="class_c_mutex_html"><div class="ttname"><a href="../../d3/d0d/class_c_mutex.html">CMutex</a></div><div class="ttdef"><b>Definition:</b> mutex.h:31</div></div>
<div class="ttc" id="classgc_handle_t_html_ab35bfc017cd77053934dd6badb162acd"><div class="ttname"><a href="../../d4/ddd/classgc_handle_t.html#ab35bfc017cd77053934dd6badb162acd">gcHandleT::isValid</a></div><div class="ttdeci">bool isValid()</div><div class="ttdef"><b>Definition:</b> gc.h:174</div></div>
<div class="ttc" id="classgc_handle_t_html_ab798d5e461aaea13ad76b25753342346"><div class="ttname"><a href="../../d4/ddd/classgc_handle_t.html#ab798d5e461aaea13ad76b25753342346">gcHandleT::operator&amp;</a></div><div class="ttdeci">virtual xHandle operator&amp;()</div></div>
<div class="ttc" id="class__gc___html_a99eeb7570f75b51df025d2a4c8b0c12a"><div class="ttname"><a href="../../df/dee/class__gc__.html#a99eeb7570f75b51df025d2a4c8b0c12a">_gc_::m_gc</a></div><div class="ttdeci">GC_T * m_gc</div><div class="ttdef"><b>Definition:</b> gc.h:57</div></div>
<div class="ttc" id="classgc_handle_t_html_a0b8a2e0f42aec92f550bc40f29576bc0"><div class="ttname"><a href="../../d4/ddd/classgc_handle_t.html#a0b8a2e0f42aec92f550bc40f29576bc0">gcHandleT::count</a></div><div class="ttdeci">virtual int count()</div></div>
<div class="ttc" id="classgc_handle_t_html_adea057fa184e0afd46abc0b6e9d4b762"><div class="ttname"><a href="../../d4/ddd/classgc_handle_t.html#adea057fa184e0afd46abc0b6e9d4b762">gcHandleT::clone</a></div><div class="ttdeci">virtual xHandle clone()</div></div>
<div class="ttc" id="classgc_handle_t_html_afa65ed5c2bf8f467839f30979e507f2d"><div class="ttname"><a href="../../d4/ddd/classgc_handle_t.html#afa65ed5c2bf8f467839f30979e507f2d">gcHandleT::operator=</a></div><div class="ttdeci">virtual gcHandleT&lt; CType &gt; &amp; operator=(gcHandleT&lt; CType &gt; &amp;gc)</div></div>
<div class="ttc" id="classgc_handle_t_html_aabf6aa22cd176b662a6aec0a7f7fa447"><div class="ttname"><a href="../../d4/ddd/classgc_handle_t.html#aabf6aa22cd176b662a6aec0a7f7fa447">gcHandleT::operator!=</a></div><div class="ttdeci">bool operator!=(gcHandleT&lt; CType &gt; &amp;gc)</div></div>
<div class="ttc" id="class_c_object_html"><div class="ttname"><a href="../../dc/dac/class_c_object.html">CObject</a></div><div class="ttdef"><b>Definition:</b> object.h:36</div></div>
<div class="ttc" id="class_c_mutex_html_a820d77775dfd7d5dddfdac6bbf89b67a"><div class="ttname"><a href="../../d3/d0d/class_c_mutex.html#a820d77775dfd7d5dddfdac6bbf89b67a">CMutex::lock</a></div><div class="ttdeci">virtual void lock()</div></div>
<div class="ttc" id="classgc_handle_t_html_aa0fc335ecb4fac2a292f3b7e7ffd33c7"><div class="ttname"><a href="../../d4/ddd/classgc_handle_t.html#aa0fc335ecb4fac2a292f3b7e7ffd33c7">gcHandleT::operator[]</a></div><div class="ttdeci">virtual CType &amp; operator[](int index)</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_d9ab3e09413249e340719d1c246acc66.html">Jason Project</a></li><li class="navelem"><a class="el" href="../../dir_e60b0d0338763df7a227cbecf5ac6106.html">Firmware</a></li><li class="navelem"><a class="el" href="../../dir_c8ef7bdfc8622ceb56fdbfff8f44a6b4.html">lpcxpresso</a></li><li class="navelem"><a class="el" href="../../dir_bc2544560b94a5512f672a61310393b1.html">ucxpresso.lite</a></li><li class="navelem"><a class="el" href="../../dir_89b485e3174b4ad30c1cd4b50a79dec9.html">uCXpresso.BLE</a></li><li class="navelem"><a class="el" href="../../dir_ef35519cefd621f663612ebad34cbfc9.html">inc</a></li><li class="navelem"><a class="el" href="../../dir_23b8956a4518e3beec6402c1bb795b19.html">class</a></li><li class="navelem"><b>gc.h</b></li>
    <li class="footer">Generated on Fri Apr 11 2014 23:43:26 for uCXpresso.BLE by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
